package com.example.dicos.service;

import com.example.dicos.entity.ManHour;
import com.example.dicos.entity.dot.ManHourDto;
import com.example.dicos.entity.dot.ManHourUpdateDto;

import java.math.BigDecimal;
import java.text.ParseException;
import java.util.List;

/**
 * @description:
 * @author: 朱超
 * @createDate: 2022/7/15
 * @version: 1.0
 * @remark：备注
 */
public interface ManHourService {

    /**
     * 工时列表
     * @return
     */
    List<ManHour> queryManHourList();

    /**
     * 根据用户姓名查询
     * @param userName
     * @return
     */
    List<ManHour> queryByNameList(String userName) throws ParseException;

    /**
     * 当前月的列表
     * @param userName
     * @return
     * @throws ParseException
     */
    List<ManHour> queryByName(String userName, String date) throws ParseException;


    List<ManHour> queryDate(String date);

    /**
     * 添加
     */
    Integer addManHour(ManHourDto manHour) throws ParseException;

    /**
     * 修改信息
     * @param manHourUpdate
     * @return
     */
    Integer updateManHour(ManHourUpdateDto manHourUpdate) throws ParseException;


    /**
     * 统计当前用户的工时
     */
    BigDecimal statisticsUserHour(Long userId,String date);

    /**
     * 统计所有工时
     */
    BigDecimal statisticsHour(String date);

}
